package com.wish.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.wish.dto.TJrFactoringDetailDto;
import com.wish.entity.TJrFactoringDetail;
import com.wish.mapper.TJrFactoringDetailMapper;
import com.wish.service.ITJrFactoringDetailService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author 五组
 * @since 2021-04-08
 */
@Service
public class TJrFactoringDetailServiceImpl extends ServiceImpl<TJrFactoringDetailMapper, TJrFactoringDetail> implements ITJrFactoringDetailService {


    @Autowired
    TJrFactoringDetailMapper tJrFactoringDetailMapper;

    @Override
    public PageInfo<TJrFactoringDetail> getlist(TJrFactoringDetailDto tJrFactoringDetailDto) {
        PageHelper.startPage(tJrFactoringDetailDto.getPageNum(),tJrFactoringDetailDto.getPageSize());
        List<TJrFactoringDetail> list =  tJrFactoringDetailMapper.getlist(tJrFactoringDetailDto);
        for (TJrFactoringDetail a:list
             ) {
            System.out.print(a);
        }
        System.out.print(list);
        return new PageInfo<>(list);
    }
}
